var currentDate = new Date();
var year = currentDate.getFullYear();
var month = currentDate.getMonth() + 1; // 月份从0开始，所以需要加1
var date = currentDate.getDate();

console.log(year, month, date);